package com.woniu.dao;

import com.woniu.pojo.RolesMenus;
import com.woniu.pojo.RolesMenusKey;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RolesMenusMapper {
    int insert(RolesMenus record);

    int insertSelective(RolesMenus record);

    void saveRolesMenus(List<RolesMenusKey> list);

    @Delete("delete from pc_roles_menus where role_id = #{value}")
    void deleteByRoleId(Integer roleId);

    void batchDeleteByRoleId(List<Integer> rolesId);

    @Select("select * from pc_roles_menus where menu_id = #{mid}")
    List<RolesMenusKey> selectByMenuId(Integer mid);
}